package io;

import java.io.FileOutputStream;
import java.io.IOException;
import java.io.ObjectOutputStream;

public class OOSDemo2 {
    public static void main(String[] args) throws IOException {
        String[] other ={"唱","跳","rap"};
        Student2 stu = new Student2("美女",20,"女",other);
        FileOutputStream fos = new FileOutputStream("oos2.txt");
        ObjectOutputStream oos = new ObjectOutputStream(fos);
        oos.writeObject(stu);
        System.out.println("写出完毕");
        oos.close();
    }
}
